﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using IHISCETeim.BLL;
using IHISCETeim.Library;
using IHISCETeim.Model;

namespace IHISCETeim.Web.MachineSys.SysBasic
{
    public partial class USMSTempleteAdd : PageBase
    {
        protected override Permission[] PowerKey
        {
            get
            {
                return new Permission[] { Permission.新增 };
            }
        }

        protected override string DWZRef
        {
            get { return "USMSTempleteList"; }
        }
       

        protected void Page_Load(object sender, EventArgs e)
        {
            if (GetRequestValue<string>("ajaxmethod", "") == "add")
            {
                addmenu();
            }
        }

        protected void addmenu()
        {
            string key = GetRequestValue<string>("TKEY","");
            string SMSContent = GetRequestValue<string>("SMSContent", "");

            if (USMSTempleteController.Add(key, SMSContent))
                SuccessJson("添加成功");
            else
                ErrorJson("添加失败");
        }
    }
}